﻿using Akka.Actor;
using Akka.Routing;

namespace Akka.Ext.Http
{
    public class AkkaHttpServer
    {
        ActorSystem actorSystem;

        IActorRef actor;

        public AkkaHttpServer(ActorSystem actorSystem, string actorName, string baseUrl = null, int poolCount = 100)
        {
            this.actorSystem = actorSystem;
            var props = Props.Create<MyActor>(baseUrl).WithRouter(new RoundRobinPool(poolCount));
            actor = actorSystem.ActorOf(props, actorName);
        }
    }
}
